class ProductionController < ApplicationController
  
  def search
    @query = params[:q] || ""
    @items = Item.search_blueprint(@query)
    if @items.empty?
      flash[:notice] = "Sorry nothing found!"
      redirect_to :action => "index"
    else
      render_partial_collection "item", @items
    end
  end
  
  
  def show

    unless params[:id]
      redirect_to :action => "index"
    end
    @item = Item.find(params[:id]) 
    
  end
  
end
